// 登录接口
import http from '@/http'

// 登录相关

// 登录
const login = (params) => {
    return http.post('v1/login', params)
}

// 退出
const logout = (params) => {
    return http.post('v1/logout', params)
}

// 刷新token
const refreshToken = (params) => {
    return http.post('v1/refresh', params)
}

// 获取我的菜单
const getMyMenus = (params) => {
    return http.get('v1/me/menus', { params })
}

// 获取我的权限
const getMyPermissions = (params) => {
    return http.get('v1/me/permissions', { params })
}

// 修改密码
const changePsd = (params) => {
    return http.put('v1/me/password/change', params)
}

export { login, logout, refreshToken, getMyMenus, getMyPermissions, changePsd }